import 'dart:convert';

import 'package:enterprise_v6_app/app/data/common/tree_node_child_bean.dart';
import 'package:enterprise_v6_app/generated/json/base/json_field.dart';
import 'package:enterprise_v6_app/generated/json/communication_personnel_entity.g.dart';
export 'package:enterprise_v6_app/generated/json/communication_personnel_entity.g.dart';

/// 通讯节点下通讯人员实体
@JsonSerializable()
class CommunicationPersonnelEntity implements TreeNodeChildBean{

	CommunicationPersonnelEntity();

	factory CommunicationPersonnelEntity.fromJson(Map<String, dynamic> json) => $CommunicationPersonnelEntityFromJson(json);
	late String communicationId = '';
	late String communicationName = '';
	late String companyCode = '';
	late String createBy = '';
	late String createById = '';
	late String createDate = '';
	late String deleted = '';
	late String id = '';
	late String phone = '';
	late String postName = '';
	late String updateBy = '';
	late String updateById = '';
	late String updateDate = '';
	late String userName = '';

	Map<String, dynamic> toJson() => $CommunicationPersonnelEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}

  @override
  late bool isSelected = false;

  @override
  String getId() {
    return id;
  }

  @override
  String getShowName() {
    return userName;
  }

  @override
  String getShowRole() {
    return postName;
  }

  @override
  String getShowPhone() {
    return phone;
  }
}
